.head สถิติจำนวนผู้ลงทะเบียนในระบบจำแนกตามจังหวัด
%style
  th {border-bottom:solid #6C99C6 2px;padding-bottom:10px;color:#2175BC}
  td {padding-top:5px; }
%p
%table{:style=>'clear:left;width:100%;margin-top:0px;', :cellspacing=>0}
  %tr
    %th จังหวัด
    %th จำนวนผู้ลงทะเบียน
  - @provinces.each do |province|
    - p= province.attributes["province"]
    - next if p.blank?
    - num_users = User.count_by_sql "SELECT COUNT(*) FROM users WHERE province= '#{p}'"
    %tr{:style=>"background-color:#{cycle('#ddd','#fff')};"}
      - if p =~ /\d+/
        - pp= Province.find_by_code p
        %td= link_to pp.th, :action=>:users_amphoe, :province=>p
      - else
        %td= link_to p, :action=>:users_amphoe, :province=>p
      %td{:style=>'text-align:right;'}= num_users

%p{:style=>'clear:both; height:20px;'}
